package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"ruoyi-vue-pro-go/api/common"
	"ruoyi-vue-pro-go/internal/model/entity"
)

type GetOneReq struct {
	g.Meta `path:"/admin-api/system/post/get" method:"get" tags:"post" permission:"system:post:query" summary:"Get one post"`
	Id     int64 `v:"required" dc:"post id"`
}
type GetOneRes struct {
	*entity.SystemPost `dc:"post"`
}

type GetListReq struct {
	g.Meta `path:"/admin-api/system/post/simple-list" method:"get" tags:"post" summary:"Get post list"`
}
type GetListRes struct {
	List []*entity.SystemPost `json:"list" dc:"post list"`
}

type GetPageReq struct {
	g.Meta `path:"/admin-api/system/post/page" method:"get" tags:"post Page" summary:"Get post pages"`
	*common.CommonPageReq
	Name   string `json:"name" dc:"name"`
	Code   string `json:"code" dc:"code"`
	Status int    `json:"status" dc:"status"`
}
type GetPageRes struct {
	List []*entity.SystemPost `json:"list" dc:"post pages"`
	*common.CommonPageRes
}

type CreateReq struct {
	g.Meta   `path:"/admin-api/system/post/create" method:"post" tags:"post" permission:"system:post:create" summary:"Create post"`
	Name     string `v:"required" dc:"岗位名称"`
	Code     string `v:"required" dc:"岗位编码"`
	Sort     int    `v:"required" dc:"显示顺序"`
	Status   int    `v:"required" dc:"状态（0正常 1停用）"`
	Remark   string `dc:"备注"`
	Creator  string `dc:"创建者"`
	Updater  string `dc:"更新者"`
	TenantId int64  `dc:"租户编号"`
}
type CreateRes struct{}

type DeleteReq struct {
	g.Meta `path:"/admin-api/system/post/delete" method:"delete" tags:"post" permission:"system:post:delete" summary:"Delete post"`
	Id     int64 `v:"required"`
}
type DeleteRes struct{}

type DeleteListReq struct {
	g.Meta `path:"/admin-api/system/post/delete-list" method:"delete" tags:"post" permission:"system:post:delete" summary:"Delete post list"`
	Ids    string `v:"required" dc:"岗位id列表"`
}
type DeleteListRes struct{}

type UpdateReq struct {
	g.Meta   `path:"/admin-api/system/post/update" method:"put" tags:"post" permission:"system:post:update" summary:"Update post"`
	Id       int64  `v:"required" dc:"岗位ID"`
	Name     string `v:"required" dc:"岗位名称"`
	Code     string `v:"required" dc:"岗位编码"`
	Sort     int    `v:"required" dc:"显示顺序"`
	Status   int    `v:"required" dc:"状态（0正常 1停用）"`
	Remark   string `dc:"备注"`
	Creator  string `dc:"创建者"`
	Updater  string `dc:"更新者"`
	TenantId int64  `dc:"租户编号"`
}
type UpdateRes struct{}

type ExportExcelReq struct {
	g.Meta `path:"/admin-api/system/post/export-excel" method:"get" tags:"post" permission:"system:post:export" summary:"Export post excel"`
}
type ExportExcelRes struct {
	g.Meta `mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" type:"string" example:"<file content>"`
}
